package com.group.transaction.config;

import com.group.transaction.util.DateTimeUtil;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * 全局日期转换类
 *
 * @author YunXing Pang
 * @date 2019/8/3
 */
@Component
public class DateConverterConfig implements Converter<String, Date> {
    @Override
    public Date convert(String dateString) {
        return DateTimeUtil.dateTimeStringConverter(dateString);
    }
}
